package com.xzx.common;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author xinzhixuan
 * @version 1.0
 * @date 2024/8/4 23:23
 */
public final class DateUtil {

    public static String formatDate(long timestamp, String pattern) {
        return new SimpleDateFormat(pattern).format(new Date(timestamp));
    }
}
